package ar.edu.utn.frsf.cidisi.upcolbpip2pn.generator.petrinet;

import java.util.HashMap;
import java.util.Set;
import org.eclipse.emf.common.util.EList;
import ar.edu.utn.frsf.cidisi.upcolbpip.interactionprotocols.*;;

public class Instances
{
  protected static String nl;
  public static synchronized Instances create(String lineSeparator)
  {
    nl = lineSeparator;
    Instances result = new Instances();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = NL + "      <instance id=\"";
  protected final String TEXT_2 = "\"" + NL + "                trans=\"";
  protected final String TEXT_3 = "\">" + NL;
  protected final String TEXT_4 = NL;

  public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
     Instance instance = (Instance) argument; 
    stringBuffer.append(TEXT_1);
    stringBuffer.append( instance.getId());
    stringBuffer.append(TEXT_2);
    stringBuffer.append( instance.getSubPageId());
    stringBuffer.append(TEXT_3);
    stringBuffer.append(TEXT_4);
    return stringBuffer.toString();
  }
}
